﻿@using Jqpress.Framework.Mvc
@model Jqpress.Web.Areas.Admin.Models.ThemeListModel

@{
    Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
    ViewBag.Title = "主题设置 - 管理中心 - Powered by Jqpress";
}

<style>
    .themes{ padding: 1px;}
.themes h3 {
  margin-bottom: 0;
    margin-top: 0px;
  padding: 10px;
  border-radius: 4px;
}

.themes small {
  display:block; 
  font-size:12px;
}

.themes .theme-info {
  padding: 10px;
  overflow: hidden; 
  background: #f5f5f5;
}
</style>

<!-- BEGIN PAGE HEADER-->
<div class="row">
<div class="col-md-12">
    <!-- BEGIN PAGE TITLE & BREADCRUMB-->
    <h3 class="page-title">
        主题设置
    </h3>
    <!-- END PAGE TITLE & BREADCRUMB-->
</div>
</div>
<!-- END PAGE HEADER-->
        

 @Html.JPartial("_Notifications")

<div class="portlet-body">
         <div class="row thumbnails">

         @foreach(var theme in Model.ThemeList)
         {
             <div class="col-md-3">
                 <div class="themes"
                 @if (Model.CurrentTheme == theme.Name)
                 {
                     @:style="border: 1px solid #F7CB1B;"
                 }
                 >
                  <h3>@theme.Name</h3>
                  <img src="@theme.Thumbnail" alt="" class="img-responsive" />

                  <div class="theme-info">
                     <a href="@Url.Action("index", "home", new { area = "", theme = theme.Folder })" class="btn btn-default">预览</a>
                    <!--  <a href="@Url.Action("themeedit","option",new {themename=theme.Folder})" class="btn btn-default">编辑</a>-->
                      @if (Model.CurrentTheme == theme.Name)
                      {
                          <a href="#" class="btn btn-default disabled">启用</a>
                      }
                      else
                      {
                        <a href="@Url.Action("usetheme", "option", new { themename = theme.Folder })" class="btn btn-success">启用</a>                          
                      }
                      <!--  <button type="button" class="btn btn-default">删除</button>-->
                  </div>
               </div>
            </div>
         }
            
         </div>
                     
</div>


    <script src="/assets/scripts/app.js"></script>
   <script>
       jQuery(document).ready(function () {
           App.init();
       });
   </script>